import { fromJS } from 'immutable';
import * as constants from './constants';

// userData: 当前登陆用户的信息列表
const defaultState = fromJS({
  userData: []
});

export default (state = defaultState, action) => {
  switch(action.type) {
    case constants.GET_USERDATA:
      return state.set("userData", fromJS(action.userData));
    default:
      return state;
  }
}